/******************************************************************************
* AIR SYSTEMS LABORATORY
* AEROSPACE ENGINEERING
* UNIVERISTY OF TEXAS AT AUSTIN
* UAV FLIGHT SOFTWARE 
* DESCRIPTION:
*   
*
* SOURCE: 
* Orignial: 08/14/2008  Jorge Alvarez joroge@gmail.com
* Modified: 03/20/2009	Sergio García-Nieto sergarro@isa.upv.es
* $Id: gps.h 4 2009-07-21 17:12:11Z joroge@gmail.com $
*************************************************************************************/
#ifndef GPS_H_
#define GPS_H_

#include "globaldefs.h"

#define NAVPOSLLH				28
#define NAVPOSECEF			   	28
#define UBX_SYNC1 				0xb5
#define UBX_SYNC2 				0x62
#define g						9.81
#define POSITION_PACKET_LENGTH	8+28
#define VELOCITY_PACKET_LENGTH  8+36
#define VELNED					0x12
#define POSLLH					0x02
#define NAV						0x01
#define SYNCHAR1				0xb5
#define	SYNCHAR2				0x62

void gpsRequest(int sPort);
void gpsAcquisition(int sPort,struct gps *gpspacket);
void decodeGPSpacket(struct gps *data, byte* buffer,byte option);
int checksumCheckGPS(byte* buffer, int packet_len);


#endif /*GPS_H_*/
